<template>
  <div>
    <div>
       <span>用户名</span> <input type="text" v-model="user"><br>
       <span>密码</span> <input type="text" v-model="password"><br>
       <span>邮箱</span> <input type="text" v-model="mailbox"><br>
        <router-link to="/register"><button @click="fun()">注册</button></router-link>
    </div>
  </div>
</template>

<script>
import {rgister_fun} from '@/utlis/https'
export default {
//   name:'',
  data() {
    return {
        user:'',
        password:'',
        mailbox:''
    }
  },
  mounted() {

  },
  methods: {
     fun(){
        rgister_fun({
            name:this.user,
            pwd:this.password,
            emails:this.mailbox
        })
        .then(val=>{
          console.log(val)  
        //   this.arr = val.data.data  
        //   this.btn_num = val.data.allpage   
        })       
        .catch(e=>{     
          console.log(e)    
        })
     }
  },
}
</script>
<style lang='less' scoped>

</style>